package cmdprint

import (
	"fmt"
	"os"

	"github.com/gookit/color"
)

// CmdFatal 项目启动打印错误(会终止服务)
func CmdFatal(format string, a ...any) {
	format = fmt.Sprintf("*[ %s ]\n", format)
	color.Redp(fmt.Sprintf(format, a...))
	os.Exit(1)
}

// CmdSuccess 打印成功
func CmdSuccess(format string, a ...any) {
	format = fmt.Sprintf("*[ %s ]\n", format)
	color.Greenp(fmt.Sprintf(format, a...))
}
